package com.bm.specialvehiclefordispatcher.utils;

import com.bm.corelibs.utils.SharedPreferencesUtil;
import com.bm.specialvehiclefordispatcher.constants.Constant;

import android.content.Context;

/**
 * 
 * Copyright © 2015 蓝色互动. All rights reserved.
 * 
 * 
 */
public class SharedPreferencesHelper {

	private static SharedPreferencesHelper instance;

	private SharedPreferencesHelper() {
	}

	public static SharedPreferencesHelper getInstance(Context context) {

		if (instance == null) {
			instance = new SharedPreferencesHelper();

		}
		if (spf == null) {
			spf = new SharedPreferencesUtil(context, Constant.Login);
		}

		return instance;
	}

	private static SharedPreferencesUtil spf;

	public void setAreaId(String areaId) {
		spf.saveString("areaId", areaId);
	}

	public String getAreaId() {
		return spf.getStringByKey("areaId");
	}

	public void setBankNum(String bankNum) {
		spf.saveString("bankNum", bankNum);
	}

	public String getBankNum() {
		return spf.getStringByKey("bankNum");
	}

	public void setCompany(String company) {
		spf.saveString("company", company);
	}

	public String getCompany() {
		return spf.getStringByKey("company");
	}

	public void setCreateDate(String createDate) {
		spf.saveString("createDate", createDate);
	}

	public String getCreateDate() {
		return spf.getStringByKey("createDate");
	}

	public void setDiableTime(String diableTime) {
		spf.saveString("diableTime", diableTime);
	}

	public String getDiableTime() {
		return spf.getStringByKey("diableTime");
	}

	public void setFinishedCount(String finishedCount) {
		spf.saveString("finishedCount", finishedCount);
	}

	public String getFinishedCount() {
		return spf.getStringByKey("finishedCount");
	}

	public void setIcon(String icon) {
		spf.saveString("icon", icon);
	}

	public String getIcon() {
		return spf.getStringByKey("icon");
	}

	public void setId(String id) {
		spf.saveString("id", id);
	}

	public String getId() {
		return spf.getStringByKey("id");
	}

	public void setIsWork(String isWork) {
		spf.saveString("isWork", isWork);
	}

	public String getIsWork() {
		return spf.getStringByKey("isWork");
	}

	public void setName(String name) {
		spf.saveString("name", name);
	}

	public String getName() {
		return spf.getStringByKey("name");
	}

	public void setOwnId(String ownId) {
		spf.saveString("ownId", ownId);
	}

	public String getOwnId() {
		return spf.getStringByKey("ownId");
	}

	public void setPassword(String password) {
		spf.saveString("password", password);
	}

	public String getPassword() {
		return spf.getStringByKey("password");
	}

	public void setPhone(String phone) {
		spf.saveString("phone", phone);
	}

	public String getPhone() {
		return spf.getStringByKey("phone");
	}

	public void setStatus(String status) {
		spf.saveString("status", status);
	}

	public String getStatus() {
		return spf.getStringByKey("status");
	}

	public void setSureCode(String sureCode) {
		spf.saveString("sureCode", sureCode);
	}

	public String getSureCode() {
		return spf.getStringByKey("sureCode");
	}

	public void setWallet(String wallet) {
		spf.saveString("wallet", wallet);
	}

	public String getWallet() {
		return spf.getStringByKey("wallet");
	}

	// 站点端
	public void setStationId(String stationId) {
		spf.saveString("stationId", stationId);
	}

	public String getStationId() {
		return spf.getStringByKey("stationId");
	}

}
